package com.kaifamiao.www.demo.Do18;

public class Ex005 {
    //水仙花数；abc=a*a*a+b*b*b+c*c*c
    public static void main(String[] args) {
        //输出每个三位数
        for (int i = 100; i < 1000; i++) {
            //求百位
            int a = i / 100;
            //求十位
            int b = i % 100 / 10;
            //求个位
            int c = i % 10;

            if (i == a * a * a + b * b * b + c * c * c) {
                System.out.println(i);
            }

        }
    }
}
